<template>
    <div class="box">
        <header class="header">
            首页
        </header>
        <div class="content">
            <van-swipe :autoplay="3000" lazy-render>
                <van-swipe-item v-for="image in images" :key="image">
                    <img :src="image" style="width:100%;height:200px" />
                </van-swipe-item>
            </van-swipe>
            <van-grid>
                <van-grid-item
                    icon="https://m15.360buyimg.com/mobilecms/jfs/t1/187640/12/30456/5256/639c2315Ebc95c142/350a8f0c766f5460.png"
                    text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
                <van-grid-item icon="photo-o" text="文字" />
            </van-grid>
            <ProList />
        </div>
    </div>
</template>
<script>
import ProList from './components/ProList' // 1.引入自定义组件
export default {
    components: { // 2.注册自定义组件
        ProList  // ProList:ProList
    },
    setup() {
        const images = [
            'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
            'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
            require('@/assets/logo.png')

        ];
        return { images };
    },
};

</script>